
<%-- 
    Document   : rptAsistencia_Alumno
    Created on : 10/11/2008, 07:41:17 PM
    Author     : Lizardo Rios Villavicencio
--%>
<%@ page import="java.util.ArrayList, org.me.codigo.Matematico, org.me.codigo.Baldor" %>
<%@ page errorPage="../../../../../error.jsp?from=rptrptPagosDeudas.jsp" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!--  pageEncoding="ISO8859-1"  -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <%
            ArrayList listaPagos = new ArrayList();
            listaPagos = (ArrayList) session.getAttribute("s_lista_pagos_deudas");
            ArrayList listaNotificacion = new ArrayList();
            listaNotificacion = (ArrayList) session.getAttribute("s_lista_pagos_mensajes");
            
            //String codPersona = (session.getAttribute("s_cod_persona") == null) ? "" : (String) session.getAttribute("s_cod_persona");
            String codAlumno = (session.getAttribute("s_codigo_alumno") == null) ? "" : (String) session.getAttribute("s_codigo_alumno");
            String alumno = (session.getAttribute("s_nombre_alumno") == null) ? "" : (String) session.getAttribute("s_nombre_alumno");
            String nivel = (session.getAttribute("s_nivel_alumno") == null) ? "" : (String) session.getAttribute("s_nivel_alumno");
            String grado = (session.getAttribute("s_grado_alumno") == null) ? "" : (String) session.getAttribute("s_grado_alumno");
            String turno = (session.getAttribute("s_turno_alumno") == null) ? "" : (String) session.getAttribute("s_turno_alumno");
            String aula = (session.getAttribute("s_aula_alumno") == null) ? "" : (String) session.getAttribute("s_aula_alumno");
            String deudaActual = (session.getAttribute("s_deuda_actual") == null) ? "" : (String) session.getAttribute("s_deuda_actual");
            String deudaTotal = (session.getAttribute("s_deuda_total") == null) ? "--" : (String) session.getAttribute("s_deuda_total");
            String ENCABEZADO = null;
            String CUERPO = null;
            String FIRMA = null;
            boolean estilo = (request.getAttribute("r_estilo") == null) ? true : false;
            String fuente = "Helvetica";//Helvetica, Lithos Black, MS Serif, MS Sans Serif, Small Fonts, Swiss
            String tamanio = "2";
            String bgColor = "7893C1";
            String colorResaltado = "FFFFFF";
        %>
        
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <% if (estilo) {%>
        <link href="../../../../../css/admin_1.css" rel="stylesheet" type="text/css" />
        <link href="../../../../../css/alumno.css" rel="stylesheet" type="text/css" />
        <% } else {%> 
        <link href="dinamica/css/admin_1.css" rel="stylesheet" type="text/css" />
        <link href="dinamica/css/alumno.css" rel="stylesheet" type="text/css" />
        <% }%>
        <title>Reporte Horario Por Profesor</title>
        
        <script language="JavaScript">
             function imprimir() {
                window.parent.frames[5].focus();
                window.print();
            }
        </script>
        <style type="text/css">
            TABLE {
                /*padding:2px;*/
                /*border-color:#0A01F9; */
            }
            TH { border-color:#435C9F; }
            TR { border-color:#435C9F; }
            TD { border-color:#435C9F; }
        </style>
    </head>
    
    <body>
        <input type=button value="Imprimir" onClick="imprimir()" />
        <br/><br/>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td rowspan="2" align="center"><img src="dinamica/img/logo.jpg" width="50" height="50"></td>
                <td align="center" valign="bottom"><font face="arial" size="5"><b>I.E. ALEXANDER GRAHAM BELL</b></font></td>
            </tr>
            <tr>
                <td align="center" valign="top"><font face="arial" size="4"><b>Reporte de Pagos Por Alumno</b></font></td>
            </tr>
        </table>
        <br/>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>&nbsp;</td>
                <td colspan="2" valign="top">
                    <table width="100%" border="1" cellpadding="2" cellspacing="0" style="">
                        <tr>
                            <td width="5%" align="right">Alumno:&nbsp;</td><td width="90%"><%=alumno%></td>
                            <td width="4%" align="right">C&oacute;digo:&nbsp;</td><td width="36%"><%=codAlumno%></td>
                        </tr>
                        <tr>
                            <td align="right">Nivel:&nbsp;</td><td><%=nivel%></td>
                            <td align="right">Grado:&nbsp;</td><td><%=grado%></td>
                        </tr>
                        <tr>
                            <td align="right">Turno:&nbsp;</td><td><%=turno%></td>
                            <td align="right">Aula:&nbsp;</td><td><%=aula%></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td height="1">&nbsp;</td>
            </tr>
        </table>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <!--td width="1%">&nbsp;</td-->
                <td width="96%" height="80" valign="top">
                    <table width="100%" border="0" cellpadding="2" cellspacing="0">
                        <th width="30%" bgcolor="#<%=bgColor%>">Detalle</th>
                        <th width="10%" bgcolor="#<%=bgColor%>">Estado</th>
                        <th width="15%" bgcolor="#<%=bgColor%>">Fecha Vcto.</th>
                        <th width="15%" bgcolor="#<%=bgColor%>">Fecha Pago</th>
                        <th width="15%" bgcolor="#<%=bgColor%>">Recibo</th>
                        <th width="15%" bgcolor="#<%=bgColor%>">Importe(S/.)</th>
                        <%  if (listaPagos != null) {
                                    for (int fils = 1; fils < listaPagos.size(); ++fils) {
                                        String[] unaFila = (String[]) listaPagos.get(fils); 
                                        String estado = (unaFila[1] == null) ? "" : unaFila[1]; 
                                        String fechaV = (unaFila[2] == null) ? "" : unaFila[2]; 
                                        String fechaP = (unaFila[3] == null) ? "" : unaFila[3]; 
                                        String valor = (unaFila[5] == null) ? "--" : Matematico.truncar(unaFila[5],2);  
                                        if (estado.compareTo("Deuda") ==0) { 
                                            colorResaltado = "BBD2BE";
                                        } else {
                                            colorResaltado = "FFFFFF";
                                        }                                    %>
                        <tr bgcolor="#<%= colorResaltado%>"> 
                            <font face="<%= fuente%>" size="<%= tamanio%>">
                                <td align="left" CLASS="txtBase"><%= unaFila[0]%></td>      <!-- Detalle -->
                                <td align="left" CLASS="txtBase"><b><%= unaFila[1]%></b></td>      <!-- Estado -->
                                <td align="center" CLASS="txtBase"><%= fechaV%></td>      <!-- Fecha Vcto -->
                                <td align="center" CLASS="txtBase"><%= fechaP%></td>      <!-- Fecha Pago -->
                                <td align="center" CLASS="txtBase"><%= unaFila[4]%></td>    <!-- Recibo -->
                                <td align="right" CLASS="txtBase"><%= valor%></td>      <!-- Importe (S/.) -->
                                
                            </font>
                        </tr>
                            <%      } 
                                }       %>
                        <tr>
                            <td align="left"><b>Deuda Actual (S/.) :</b></td>
                            <td colspan="5" align="right"><%= deudaActual%></td>
                        </tr>
                        <tr>
                            <td align="left"><b>Deuda Total (S/.) :</b></td>
                            <td colspan="5" align="right"><%= deudaTotal%></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <!--tr><td height="1">&nbsp;</td></tr-->
        </table>
        <hr size="2" noshade>
        <%  if (listaNotificacion != null) {
                for (int fils = 1; fils < listaNotificacion.size(); ++fils) {
                    String[] unaFila = (String[]) listaNotificacion.get(fils);  
                    if (unaFila[0].compareTo("ENCABEZADO") == 0) {
                        ENCABEZADO = unaFila[1]; 
                    } else if (unaFila[0].compareTo("CUERPO") == 0) {
                        CUERPO = unaFila[1];
                    } else if (unaFila[0].compareTo("FIRMA") == 0) {
                        FIRMA = unaFila[1];
                    }
                }
            }                                                                 %>
                
        <%= ENCABEZADO%> <br><br>
        
        <%  String[] body = (String[]) CUERPO.split("\\|");
            for (int i=0; i<body.length; ++i) {            %>
        
                <%= body[i]%><br> 
                
        <%  }  %>
        <br><br><br>
        <center>
            <b>
               <%   String[] signature = (String[]) FIRMA.split("\\|");
                    for (int i=0; i<signature.length; ++i) {            %>
        
                        <%= signature[i]%><br> 
                
                <%  }  %> 
            </b>
        </center>    
        <br>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td height="2"><input type=button value="Imprimir" onClick="imprimir()" /></td>
                <td align="right"><a href="javascript:window.history.back()">Retornar</a>&nbsp;</td>
            </tr>
            <tr>
                <td>&nbsp;</td>
                <td>&nbsp;</td>
            </tr>
        </table>
    </body>
</html>
